<!DOCTYPE html>
<html lang="en">
	<head>
	<meta charset="UTF-8">
 <title>贵美商城注册页面</title>
	
 </head>
<script type="text/javascript" src="js/jquery-1.12.4 (1).js" ></script>
 	
 </script>
 <script>
			 $(function(){
			 	$("#Button").submit(function(){
			 		var e=$("#email").val();
			 		if(e.length==0||e.indexOf("@")<1||e.indexOf(".")<1)
			 		{
			 			alert("格式不正确");
			 			return false;
			 		}
			 		var p=$("#pass").val();
			 		if(p.length<6)
			 		{
			 			alert("密码长度必须是6位以上！");
			 			return false;
			 		}
			 		if(p!=$("#repass").val())
			 		{
			 			alert("两次密码输入的不一致");
			 			return false;
			 		}
			 		return true;
			 		if($(this).parent().prev().prev().children(":checked").length==0){
						alert("必须要有一个爱好！");
						return false;
					}
			 	});
			 });
		</script>

<body>
	<div id="container">
		<iframe id="head" runat="server" src="#" width="980px" height="136px" frameborder="0" scrolling="no"></iframe>
		<div id="main" class="reg_bg">
     <section class="register">
		 <form id="formRegister" method="post" action="register_success.htm">
			 <dl>
				 <dt>名字：</dt>
				 <dd><input id="fname" type="text" class="reg_text" size="24"></dd>
			 </dl>
			 <dl>
				 <dt>姓氏：</dt>
				 <dd><input id="lname" type="text" class="reg_text" size="24"></dd>
			 </dl>
			 <dl>
				 <dt>登录名：</dt>
				 <dd><input name="sname" type="text" class="reg_text" size="24">（可包含 a-z、0-9 和下划线）</dd>
			 </dl>
			 <dl>
				 <dt>密码：</dt>
				 <dd><input id="pass" type="password" class="reg_text" size="26">（至少包含 6 个字符）</dd>
			 </dl>
			 <dl>
				 <dt>再次输入密码：</dt>
				 <dd><input id="rpass" type="password" class="reg_text" size="26">				 </dd>
			 </dl>
			 <dl>
				 <dt>电子邮箱：</dt>
				 <dd><input id="email" type="text" class="reg_text" size="24">（必须包含 @  和.字符）</dd>
			 </dl>
			 <dl>
				 <dt>性别：</dt>
				 <dd>
					 <input id="gen" style="border:0px;" type="radio" value="男" checked="checked">
					 <img src="img/Male.gif" width="23" height="21" alt="alt">男&nbsp;
					 <input name="gen" style="border:0px;" type="radio" value="女" class="input">
					 <img src="img/Female.gif" width="23" height="21" alt="alt">女
				 </dd>
			 </dl>
			 <dl>
				 <dt>头像：</dt>
				 <dd><input type="file"> </dd>
			 </dl>
			 <dl>
				 <dt>爱好：</dt>
				 <dd>
					 <label>
						 <input type="checkbox" id="checkbox" value="checkbox">
					 </label>
					 运动&nbsp;&nbsp;
					 <label>
						 <input type="checkbox" id="checkbox2" value="checkbox">
					 </label>
					 聊天&nbsp;&nbsp;
					 <label>
						 <input type="checkbox" id="checkbox3" value="checkbox">
					 </label>
					 玩游戏
				 </dd>
			 </dl>
			 <dl>
				 <dt>出生日期：</dt>
				 <dd>
					 <input id="nYear" class="reg_text n4" value="yyyy" maxlength="4">&nbsp;年&nbsp;&nbsp;
					 <select id="nMonth">
						 <option value="" selected="selected">[选择月份]</option>
						 <option value="0">一月</option>
						 <option value="1">二月</option>
						 <option value="2">三月</option>
						 <option value="3">四月</option>
						 <option value="4">五月</option>
						 <option value="5">六月</option>
						 <option value="6">七月</option>
						 <option value="7">八月</option>
						 <option value="8">九月</option>
						 <option value="9">十月</option>
						 <option value="10">十一月</option>
						 <option value="11">十二月</option>
					 </select>&nbsp;月&nbsp;&nbsp;
					 <input id="nDay" class="reg_text n4" value="dd" size="2" maxlength="2">日
				 </dd>
			 </dl>
			 <dl>
				 <dt>&nbsp;
				 </dt>
				 <dd>
					 <input type="image" id="Button" style="border:0px;" src="images/submit.gif"> <img src="images/reset.gif" onclick="javascript:form1.reset();" style="cursor:pointer;" alt="重置">
				 </dd>
			 </dl>
     </form>
	 </section>
		
    </div>
		<iframe id="foot" runat="server" src="#" width="980px" height="150px" frameborder="0" scrolling="no"></iframe>
	</div><!--container	end-->

		</body></html>